import { defineStore } from "pinia";
import { indexKey } from "./keys";
interface IState {
  menus: IRouterDatum[];
}
type menu = IRouterModel[];

export const useRouter = defineStore(indexKey, {
  state(): IState {
    return {
      menus: [],
    };
  },
  getters: {
    routes(val) {
      this.menus = val;
    },
  },
});
